<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"  
      xmlns:h="http://java.sun.com/jsf/html">

    <h:head>
        
         
        <title>JBoss Start App</title>
    </h:head>
    <h:body>
        <h:form>

<p:growl id="growl" globalOnly="true" showDetail="true" sticky="true" />  



    <p:panel id="basic" header="Add user" footer="Copyright" style="width:800px; height:135px; border=1px solid black; position:relative; left:100px">

    

		<p:panelGrid id="userData" columns="3" styleClass="panelGridStyle">
		 
		    <h:outputText value="Name:" />
		    <p:inputText id="name" value="#{userServices.user.name}"></p:inputText>		 	
		 	<p:message for="name" style="color:red"/>
		 
		 
		    <h:outputText value="Age:" />
		    <p:inputText id="age" value="#{userServices.user.age}"></p:inputText>
		 	<p:message for="age" style="color:red"/>

		</p:panelGrid>
		<br></br>
		
		<p:commandButton id="back" value="Submit" action="#{userServices.action()}" update="growl, userData"/>

</p:panel>
            
        </h:form>
       
       <h:form>
        
        <h:commandLink value="addUser"></h:commandLink>
        
        </h:form> 
        
    </h:body>
</html>